package com.android.billingclient.api;

import android.text.TextUtils;
import java.util.List;
import org.json.JSONObject;

public class l {

    /* renamed from: a  reason: collision with root package name */
    private final String f2076a;

    /* renamed from: b  reason: collision with root package name */
    private final JSONObject f2077b = new JSONObject(this.f2076a);

    public static class a {

        /* renamed from: a  reason: collision with root package name */
        private List<l> f2078a;

        /* renamed from: b  reason: collision with root package name */
        private final int f2079b;

        /* renamed from: c  reason: collision with root package name */
        private final String f2080c;

        public a(int i, String str, List<l> list) {
            this.f2079b = i;
            this.f2080c = str;
            this.f2078a = list;
        }

        public String a() {
            return this.f2080c;
        }

        public int b() {
            return this.f2079b;
        }

        public List<l> c() {
            return this.f2078a;
        }
    }

    public l(String str) {
        this.f2076a = str;
    }

    public String a() {
        return this.f2077b.optString("price");
    }

    public String b() {
        return this.f2077b.optString("productId");
    }

    public String c() {
        return this.f2077b.optString("type");
    }

    public boolean d() {
        return this.f2077b.has("rewardToken");
    }

    public final String e() {
        return this.f2077b.optString("packageName");
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof l)) {
            return false;
        }
        return TextUtils.equals(this.f2076a, ((l) obj).f2076a);
    }

    /* access modifiers changed from: package-private */
    public final String f() {
        return this.f2077b.optString("skuDetailsToken");
    }

    /* access modifiers changed from: package-private */
    public final String g() {
        return this.f2077b.optString("rewardToken");
    }

    public int hashCode() {
        return this.f2076a.hashCode();
    }

    public String toString() {
        String valueOf = String.valueOf(this.f2076a);
        return valueOf.length() != 0 ? "SkuDetails: ".concat(valueOf) : new String("SkuDetails: ");
    }
}
